#ifndef WIDGET3D_H
#define WIDGET3D_H

#include <QOpenGLWidget>
#include <QOpenGLExtraFunctions>
#include <QOpenGLShaderProgram>
#include <QDebug>
#include <QOpenGLTexture>
#include <QMatrix4x4>
#include <QVector3D>

class Widget3D : public QOpenGLWidget, protected QOpenGLExtraFunctions
{
    Q_OBJECT
public:
    Widget3D();
    ~Widget3D();

protected:
    virtual void initializeGL();
    virtual void resizeGL(int w, int h);
    virtual void paintGL();

private:
    //着色器程序
    QOpenGLShaderProgram* m_program;
    //位置
    GLuint m_posAttr;
    GLuint m_colorAttr;

    GLuint m_VAO[1];
    GLuint m_VBO[1];
    GLuint m_EBO[1];

};

#endif // WIDGET3D_H
